package com.mystudy.springcloud.controller;

import com.mystudy.springcloud.domain.Order;
import com.mystudy.springcloud.entities.CommonResult;
import com.mystudy.springcloud.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
	@Autowired
	private OrderService orderService;

	/**
	 * @功能: 创建订单
	 */
	@GetMapping("/order/create")
	public CommonResult createOrder(Order order) {
		orderService.createOrder(order);
		return new CommonResult(200, "订单创建成功");
	}
}
